/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ComponenteDatos;

import ComponenteClase.Personal;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author MIGUEL ARANA
 */
//cPerEstado
public interface PersonalDAO {

    public Personal insertarPersonal(Personal p) throws SQLException;

    public Personal buscarPersonalCodigo(int codigo) throws SQLException ;

    public Personal buscarPersonalNombre(String nombre) throws SQLException ;

    public Personal buscarPersonalEstado(String estado) throws SQLException ;

    public Personal buscarPersonal(String sql, Personal p) throws SQLException;

    /*public static boolean eliminarEmpleado(int nroemp) throws SQLException {
    Connection cnn = BD.getConnection();
    PreparedStatement ps = null;
    
    ps = cnn.prepareStatement("delete from EMPLEADO WHERE nroemp=?");
    ps.setInt(1, nroemp);
    int rowsUpdated = ps.executeUpdate();
    cnn.close();
    ps.close();
    if (rowsUpdated > 0) {
    return true;
    } else {
    return false;
    }
    }*/

    /*public static boolean eliminarEmpleadoDNI(int dni) throws SQLException {
    Connection cnn = BD.getConnection();
    PreparedStatement ps = null;
    
    ps = cnn.prepareStatement("delete from EMPLEADO WHERE dni=?");
    ps.setInt(1, dni);
    int rowsUpdated = ps.executeUpdate();
    cnn.close();
    ps.close();
    if (rowsUpdated > 0) {
    return true;
    } else {
    return false;
    }
    }*/
    public boolean actualizarPersonal(Personal p) throws SQLException ;

    public List<Personal> mostrarPersonal() throws SQLException;

    public List<Personal> listarPersonalPorNombre(String nombre);

    public List<Personal> listarPersonalPorCi(String ci) ;

    public List<Personal> listar(String atributo, String parametro, String comparador);

    public List<Personal> consultarSQL(String sql);
}